<?php
if (!defined('TYPO3_MODE')) {
	die ('Access denied.');
}


\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
	$_EXTKEY,
	'List',
	'Liste des montagnes'
);

// \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
	// $_EXTKEY,
	// 'UserNewsletter',
	// 'FE User: Subscribe Newsletters'
// );

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'mountains');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_mountains_domain_model_mountain', 'EXT:mountains/Resources/Private/Language/locallang_csh_tx_mountains_domain_model_mountain.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mountains_domain_model_mountain');
$TCA['tx_mountains_domain_model_mountain'] = array(
	'ctrl' => array(
		'title'	=> 'LLL:EXT:mountains/Resources/Private/Language/locallang_db.xlf:tx_mountains_domain_model_mountain',
		'label' => 'name',
		'tstamp' => 'tstamp',
		'crdate' => 'crdate',
		'cruser_id' => 'cruser_id',
		'dividers2tabs' => TRUE,
		'sortby' => 'sorting',
		'versioningWS' => 2,
		'versioning_followPages' => TRUE,
		'origUid' => 't3_origuid',
		'languageField' => 'sys_language_uid',
		'transOrigPointerField' => 'l10n_parent',
		'transOrigDiffSourceField' => 'l10n_diffsource',
		'delete' => 'deleted',
		'enablecolumns' => array(
			'disabled' => 'hidden',
			'starttime' => 'starttime',
			'endtime' => 'endtime',
		),
		'searchFields' => 'name,altitude,data,style,done,position,country,',
		'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Mountain.php',
		'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_mountains_domain_model_mountain.gif'
	),
);

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_mountains_domain_model_position', 'EXT:mountains/Resources/Private/Language/locallang_csh_tx_mountains_domain_model_position.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mountains_domain_model_position');
$TCA['tx_mountains_domain_model_position'] = array(
	'ctrl' => array(
		'title'	=> 'LLL:EXT:mountains/Resources/Private/Language/locallang_db.xlf:tx_mountains_domain_model_position',
		'label' => 'lat',
		'tstamp' => 'tstamp',
		'crdate' => 'crdate',
		'cruser_id' => 'cruser_id',
		'dividers2tabs' => TRUE,

		'versioningWS' => 2,
		'versioning_followPages' => TRUE,
		'origUid' => 't3_origuid',
		'languageField' => 'sys_language_uid',
		'transOrigPointerField' => 'l10n_parent',
		'transOrigDiffSourceField' => 'l10n_diffsource',
		'delete' => 'deleted',
		'enablecolumns' => array(
			'disabled' => 'hidden',
			'starttime' => 'starttime',
			'endtime' => 'endtime',
		),
		'searchFields' => 'lat,lng,time,altitude,',
		'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Position.php',
		'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_mountains_domain_model_position.gif'
	),
);

$tmp_mountains_columns = array(

);

t3lib_extMgm::addTCAcolumns('static_countries',$tmp_mountains_columns);

$TCA['static_countries']['columns'][$TCA['static_countries']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:mountains/Resources/Private/Language/locallang_db.xlf:static_countries.tx_extbase_type.Tx_Mountains_Country','Tx_Mountains_Country');

$TCA['static_countries']['types']['Tx_Mountains_Country']['showitem'] = $TCA['static_countries']['types']['1']['showitem'];
$TCA['static_countries']['types']['Tx_Mountains_Country']['showitem'] .= ',--div--;LLL:EXT:mountains/Resources/Private/Language/locallang_db.xlf:tx_mountains_domain_model_country,';
$TCA['static_countries']['types']['Tx_Mountains_Country']['showitem'] .= '';

?>